package com.artPreter.mapper;

import com.artPreter.pojo.Article;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 文章内容表 Mapper 接口
 * </p>
 *
 * @author jarvis
 * @since 2024-11-21
 */
@Mapper
public interface ArticleMapper extends BaseMapper<Article> {


    @Select(" select b.*,s.sort as ctSort,s.content_id as contentId  FROM jv_content_article_relative s left join jv_article b on s.article_id = b.article_id ${ew.customSqlSegment} ")
    IPage<Article> getRelatedArticlePageList(IPage<Article> articleIPage, @Param(Constants.WRAPPER) Wrapper wrapper);
}
